home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 010 / blit.arc / SCRNSWAP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1985-05-23  |  843 b   |  33 lines

  1. /*
  2.  * name:         screenswap
  3.  *
  4.  * description: interchange the data in the bitmap b with the contents
  5.  *              of the rectangle r on the screen.
  6.  *
  7.  * synopsis:     screenswap (b, r)
  8.  *              struct bitmap   *b;
  9.  *              struct rectangle    *r;
  10.  *
  11.  * globals:      display  (r/w)
  12.  *
  13.  * calls:        bitblt  (bitblt.c)
  14.  *
  15.  * called by:    upfront  (upfront.c)
  16.  */
  17. #include "layers.h"
  18.  
  19. extern struct bitmap  *display;
  20.  
  21. screenswap (b, r)
  22. struct bitmap *b;
  23. struct rectangle  *r;
  24. {
  25.  /*
  26.  * implemented, without auxialiary storage, using three
  27.  * calls to bitblt() with function code xor
  28.  */
  29.    (void) bitblt (display, &r, b, &(r -> origin), null, s_xor_d);
  30.    (void) bitblt (b, &r, display, &(r -> origin), null, s_xor_d);
  31.    (void) bitblt (display, &r, b, &(r -> origin), null, s_xor_d);
  32. }
  33.